//
//  ViewController.m
//  03_homework_响应者
//
//  Created by dllo on 16/7/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "ButtonImage.h"
#import "ButtonLabel.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    ButtonLabel *buttonLabel = [[ButtonLabel alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    buttonLabel.text = @"buttonLabel";
    [self.view addSubview:buttonLabel];
    [buttonLabel.tap addTarget:self action:@selector(labelTap)];
    
    
    ButtonImage *imageView = [[ButtonImage alloc] initWithFrame:CGRectMake(100, 250, 200, 200)];
    imageView.image = [UIImage imageNamed:@"maximal"];
    [self.view addSubview:imageView];
    [imageView.tap addTarget:self action:@selector(imageTap)];
}
- (void)labelTap {
    NSLog(@"label");
}

- (void)imageTap {
    NSLog(@"image");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
